﻿Module definition

    ' Def Structure
    '-------------------------------------
    Structure STRUCT_HOST           ' untuk data server
        Dim URL As String
        Dim PATH As String
    End Structure

    Structure STRUCT_INFO
        Dim Jenjang As String       ' SMP, SMA, SMK
        Dim KD_Sekolah As String    ' kode sekolah

        Dim Serial As String        ' serial no 

        Dim Host As String          ' host Mysql local
        Dim Port As String          ' port mysql
        Dim User As String          ' user mysql
        Dim Password As String      ' password mysql
        Dim Database As String      ' nama database mysql      

        Dim Pertamax As String      ' status aplikasi, 1=berarti baru pertama kali dijalankan, 0=lebih
        Dim IsServer As Boolean     ' status aplikasi, sebagai server ato bukan => 1=24, 
    End Structure

    Structure STRUCT_APP
        Dim Name As String          ' nama aplikasi
        Dim Version As String       ' versi aplikasi
        Dim SALT As String          ' salt encription
        Dim Host As STRUCT_HOST     ' server
        Dim Info As STRUCT_INFO     ' registry
    End Structure

    ' Def public constanta
    Public Const REG_JENJANG As String = "jenjang"
    Public Const REG_KD_SEKOLAH As String = "kd_sekolah"
    Public Const REG_SERIAL As String = "serial"
    Public Const REG_HOST As String = "host"
    Public Const REG_PORT As String = "port"
    Public Const REG_USER As String = "user"
    Public Const REG_PASSWORD As String = "password"
    Public Const REG_DATABASE As String = "database"
    Public Const REG_PERTAMAX As String = "pertamax"
    Public Const REG_ISSERVER As String = "server"

    ' Def public variable
    '-------------------------------------
    Public APP As STRUCT_APP
    Public SignalUpload As Boolean = False

    ' untuk di smk
    Public Pengkali_UN As Integer = 1
    Public Pengkali_US As Integer = 1


    ' Def Class
    '-------------------------------------
    Public ListSekolah As New cls_list      ' database internal yg menampung list sekolah [SMP, SMA, SMK] tergantung login

    Public Validation As New cls_validation
    Public Connection As New cls_connection
    Public DB As New cls_database
    Public Encript As New cls_encription
    Public Reg As New cls_registry
    Public SOCKET As New cls_socket("ppdbkotabandung.web.id", "14045")


End Module
